package com.example.demo.rest;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

/**
 * @author juntao.zhang
 * @version V1.0
 * @Description: TODO
 * @Package org.zjt.config.rest
 * @date 2017/12/13 22:32
 */
@RestController
public class ConfigController {


    @GetMapping("/pull/{applicationName}/{env}")
    public Map<String,Object> pullProperties(
            @PathVariable(value = "applicationName") String applicationName
            ,@PathVariable(value = "env")String env) {
        Map<String,Object> data = new HashMap<>();
        data.put("server.port",89);
        data.put("zhang.age",25);
        data.put("env",env);
        data.put("applicationName",applicationName);
        System.err.println(System.currentTimeMillis());
        return data;

    }
}
